Graph Rewriting for Hardware Dependent Program Optimizations
نویسندگان
چکیده
We present a compiler internal program optimization that uses graph rewriting. This optimization enables the compiler to automatically use rich instructions (such as SIMD instructions) provided by modern CPUs and is transparent to the user of the compiler. New instructions can be introduced easily by specifying their behaviour in a high-level programming language. The optimization is integrated into an existing compiler, gaining high speedup.
منابع مشابه
Interprocedural Constant Propagation using Dependence Graphs and a Data-Flow Model
Aggressive compilers employ a larger number of well understood optimizations in the hope of improving compiled code quality. Unfortunately, these optimizations require a variety of intermediate program representations. A first step towards unifying these optimizations to a common intermediate representation is described. The representation chosen is the program dependence graph, which captures ...
متن کاملRelating Graph and Term Rewriting via B
Dealing properly with sharing is important for expressing some of the common compiler optimizations, such as common subex-pressions elimination, lifting of free expressions and removal of invariants from a loop, as source-to-source transformations. Graph rewriting is a suitable vehicle to accommodate these concerns. In 4] we have presented a term model for graph rewriting systems (GRSs) without...
متن کاملGraph Rewrite Systems For Program Optimization
In this paper we demonstrate how graph rewrite systems can be used to specify and generate program optimizations. For termination of the systems we develop several rule-based criteria, deening exhaustive graph rewrite systems. For non-deterministic systems we introduce stratii-cation which automatically selects single normal forms. To illustrate how far the methodology reaches, we specify parts...
متن کاملGrGen: A Fast SPO-Based Graph Rewriting Tool
Graph rewriting is a powerful technique that requires graph pattern matching, which is an NP-complete problem. We present GrGen, a generative programming system for graph rewriting, which applies heuristic optimizations. According to Varró’s benchmark it is at least one order of magnitude faster than any other tool known to us. Our graph rewriting tool implements the well-founded single-pushout...
متن کاملCompiler Optimization: A Case for the Transformation Tool Contest
An optimizing compiler consists of a front end parsing a textual programming language into an intermediate representation (IR), a middle end performing optimizations on the IR, and a back end lowering the IR to a target representation (TR) built of operations supported by the target hardware. In modern compiler construction graph-based IRs are employed. Optimization and lowering tasks can then ...
متن کامل